<%
   no_record_message = t('views.clients.no_record_msg')
   if params[:status] == "archived" || @action == "recovered from archived" ||  @action == "deleted from archived"
     no_record_message = t('views.clients.no_archived_client')
   elsif params[:status] == "deleted" || @action == "recovered from deleted"
     no_record_message = t('views.clients.no_deleted_client')
   end
   test = @clients.first
%>

<% if @clients.length > 0 %>
    <% @clients.each do |client| %>
        <tr>
          <td class="align_center"><%= check_box_tag "client_ids[]", client.id, false, :id => "client_#{client.id}" %></td>
          <td class="align_left"><%= link_to(client.organization_name, 'javascript:', class: "client_name text-overflow-class #{ 'deleted_entry' if client.deleted? }", value: client.id) %></td>
          <td class="align_left text-overflow-class" data-overflow-rows="2"><%= client.contact_name %></td>
          <td class="align_left text-overflow-class" data-overflow-rows="2"><%= client.email %></td>
          <td class="align_left text-overflow-class" data-overflow-rows="2"><%= client.business_phone %></td>
          <td class="align_right"><%=  number_to_currency(client.client_credit, unit: client.currency_symbol) %></td>
          <td class="align_center">
            <% if client.deleted_at.nil? %>
                <%= link_to t('.edit', :default => t("helpers.links.edit")),
                            edit_client_path(client), :class => 'edit_action' %>
            <% else %>
                <%= link_to t('views.common.recover', :default => t("helpers.links.recover")),
                            "javascript:;", class: "single-recover-link" %>
            <% end %>
          </td>
        </tr>
    <% end %>
<% else %>
    <tr>
      <td colspan="6">
        <div class="no_record_container">
          <%= no_record_message %>
        </div>
      </td>
    </tr>
<% end %>
